#pragma once

#include "common/define/noncopyable.h"
#include "common/container/details/fixed_buffer.h"

namespace xlog {

/**
 * 日志流
 */
class LogStream : public noncopyable
{
public:
    using Buffer = FixedBuffer<1024>;
    using Self = LogStream;
public:
    Self& operator << (int16_t) { return *this; }
    Self& operator << (uint16_t) { return *this; }
    Self& operator << (int32_t) { return *this; }
    Self& operator << (uint32_t);
    Self& operator << (int64_t) { return *this; }
    Self& operator << (uint64_t) { return *this; }
    Self& operator << (const char *str);
public:
    const Buffer& buffer() const
    { return m_buffer; }

    void reset()
    { m_buffer.reset(); }

    void clear()
    { m_buffer.clear(); }
private:

private:
    Buffer m_buffer;
};

}  // namespace xlog